import request from "@/utils/request";

/**
 * @description 任务类型列表 可搜索
 * @param {Object} data
 */
export function taskTypeList (params = {}) {
  // 接口请求
  return request({
    url: 'tasktype/list',
    method: 'get',
    params
  })
}
/**
 * @description 添加任务类型
 * @param {Object} data
 */
export function tasktypeAdd (data = {}) {
  // 接口请求
  return request({
    url: 'tasktype/add',
    method: 'post',
    data,
    isJSON: false
  })
}
/**
 * @description 添加任务类型
 * @param {Object} data
 */
export function tasktypeEdit (data = {}) {
  // 接口请求
  return request({
    url: 'tasktype/edit',
    method: 'post',
    data,
    isJSON: false
  })
}
/**
 * @description 添加任务类型
 * @param {Object} data
 */
export function tasktypeDelete (data = {}) {
  // 接口请求
  return request({
    url: 'tasktype/delete',
    method: 'post',
    data,
    isJSON: false
  })
}
/**
 * @description 任务列表 可搜索
 * @param {Object} data
 */
export function taskList (params = {}) {
  // 接口请求
  return request({
    url: 'task',
    method: 'get',
    params
  })
}
/**
 * @description 添加任务
 * @param {Object} data
 */
export function taskAdd (data = {}) {
  // 接口请求
  return request({
    url: 'task/add',
    method: 'post',
    data,
    isJSON: false
  })
}
/**
 * @description 编辑任务
 * @param {Object} data
 */
export function taskEdit (data = {}) {
  // 接口请求
  return request({
    url: 'task/edit',
    method: 'post',
    data,
    isJSON: false
  })
}
/**
 * @description 删除任务
 * @param {Object} data
 */
export function taskDelete (data = {}) {
  // 接口请求
  return request({
    url: 'task/delete',
    method: 'post',
    data,
    isJSON: false
  })
}

// 图标列表 可搜索
export function tasktypeIconlist (params = {}) {
  return request({
    url: 'tasktype/iconlist',
    method: 'get',
    params
  })
}

// 添加图标
export function tasktypeIconAdd (data = {}) {
  return request({
    url: 'tasktype/iconadd',
    method: 'post',
    data,
    isJSON: false
  })
}

// 编辑图标
export function tasktypeIconEdit (data = {}) {
  // 接口请求
  return request({
    url: 'tasktype/iconedit',
    method: 'post',
    data,
    isJSON: false
  })
}

// 删除图标
export function tasktypeIcondelete (data = {}) {
  // 接口请求
  return request({
    url: 'tasktype/icondelete',
    method: 'post',
    data,
    isJSON: false
  })
}
